home *** CD-ROM | disk | FTP | other *** search
/ Champak 145 / (Vol 145) Dec 21 2011.iso / Games / hanna-in-a-choppa.swf / scripts / __Packages / com / mosesSupposes / fuse / ZManager.as < prev   
Encoding:
Text File  |  2011-12-21  |  39.5 KB  |  1,074 lines

  1. class com.mosesSupposes.fuse.ZManager
  2. {
  3.    var tweens;
  4.    var now;
  5.    var numTweens = 0;
  6.    function ZManager()
  7.    {
  8.       this.tweens = {};
  9.       this.numTweens = 0;
  10.    }
  11.    function addTween(obj, props, endvals, seconds, ease, delay, callback)
  12.    {
  13.       var _loc24_ = callback.skipLevel != undefined ? callback.skipLevel : 0;
  14.       var _loc44_ = callback.cycles != undefined ? callback.cycles : 1;
  15.       var _loc30_ = callback.extra1;
  16.       var _loc29_ = callback.extra2;
  17.       var _loc23_ = [];
  18.       var _loc14_ = _global.com.mosesSupposes.fuse.FuseFMP;
  19.       var _loc43_ = String("|" + _loc14_.getAllShortcuts().join("|") + "|");
  20.       var _loc42_ = com.mosesSupposes.fuse.FuseKitCommon._cts();
  21.       var _loc25_ = "";
  22.       var _loc28_ = "";
  23.       var _loc22_ = obj.__zigoID__;
  24.       var _loc7_ = this.tweens[String(_loc22_)];
  25.       if(_loc7_ != undefined && com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)
  26.       {
  27.          if(obj._listeners.length > 0)
  28.          {
  29.             for(var _loc40_ in _loc7_.props)
  30.             {
  31.                _loc23_.unshift(_loc40_);
  32.             }
  33.          }
  34.          _loc7_.numProps = 0;
  35.          this.cleanUp(true);
  36.       }
  37.       for(var _loc47_ in props)
  38.       {
  39.          var _loc5_ = props[_loc47_];
  40.          var _loc4_ = endvals[_loc47_];
  41.          var _loc15_ = 0;
  42.          if(_loc5_ == "_fade")
  43.          {
  44.             _loc5_ = "_alpha";
  45.             _loc15_ = _loc4_ >= 50 ? 1 : -1;
  46.          }
  47.          var _loc16_ = _loc42_.indexOf("|" + _loc5_ + "|") > -1;
  48.          var _loc18_ = _loc7_.colorProp;
  49.          if(_loc7_ != undefined)
  50.          {
  51.             if(_loc16_ == true && _loc18_ != undefined)
  52.             {
  53.                _loc23_.unshift(_loc18_);
  54.                delete _loc7_.props[_loc18_];
  55.                delete _loc7_.colorProp;
  56.                _loc7_.numProps = _loc7_.numProps - 1;
  57.             }
  58.             else if(_loc7_.props[_loc5_] != undefined)
  59.             {
  60.                _loc23_.unshift(_loc5_);
  61.                delete _loc7_[_loc5_];
  62.                _loc7_.numProps = _loc7_.numProps - 1;
  63.             }
  64.          }
  65.          var _loc3_ = {c:-1,fmp:-1,complex:-1};
  66.          var _loc11_ = _loc24_ == 0 && seconds + delay == 0 || _loc24_ > 0 && seconds == 0;
  67.          var _loc10_ = false;
  68.          var _loc13_ = _loc14_ != undefined && _loc43_.indexOf("|" + _loc5_ + "|") > -1;
  69.          var _loc19_ = _loc5_.toLowerCase().indexOf("colors") > -1 && _loc4_ instanceof Array;
  70.          var _loc27_ = _loc13_ == true && _loc5_.indexOf("lor") > -1 && _loc5_.charAt(2) != "l";
  71.          if(_loc13_ == true)
  72.          {
  73.             _loc3_.fmp = _loc14_;
  74.             _loc3_.ps = _loc14_.getFilterProp(obj,_loc5_,true);
  75.             _loc3_.special = true;
  76.          }
  77.          if(_loc16_ == true || _loc19_ == true || _loc27_ && _loc11_ == false)
  78.          {
  79.             _loc3_.complex = 1;
  80.             if(_loc16_ == true)
  81.             {
  82.                _loc3_.c = new Color(obj);
  83.                _loc3_.ps = Color(_loc3_.c).getTransform();
  84.                var _loc17_ = !(_loc5_ == "_tint" || _loc5_ == "_tintPercent" || _loc5_ == "_colorReset") ? _loc5_.slice(1) : "tint";
  85.                var _loc9_ = null;
  86.                var _loc12_ = null;
  87.                if(_loc5_ != "_colorTransform")
  88.                {
  89.                   if(_loc17_ == "tint")
  90.                   {
  91.                      if(typeof _loc4_ == "object")
  92.                      {
  93.                         _loc12_ = _loc4_.tint;
  94.                         _loc9_ = _global.isNaN(_loc4_.percent) != true ? _loc4_.percent : 100;
  95.                      }
  96.                      else if(_loc5_ == "_tintPercent" || _loc5_ == "_colorReset")
  97.                      {
  98.                         var _loc20_ = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
  99.                         if(_loc5_ == "_colorReset")
  100.                         {
  101.                            _loc9_ = Math.min(_loc20_,100 - Math.abs(Number(_loc4_)));
  102.                         }
  103.                         else
  104.                         {
  105.                            _loc9_ = typeof _loc4_ != "string" ? Number(_loc4_) : (_loc20_ || 0) + Number(_loc4_);
  106.                         }
  107.                         _loc9_ = Math.max(0,Math.min(_loc9_,100));
  108.                         _loc12_ = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
  109.                      }
  110.                      else
  111.                      {
  112.                         _loc12_ = _loc4_;
  113.                         _loc9_ = 100;
  114.                      }
  115.                   }
  116.                   else
  117.                   {
  118.                      _loc9_ = typeof _loc4_ != "string" ? _loc4_ : (com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_loc17_] || 0) + Number(_loc4_);
  119.                   }
  120.                   _loc4_ = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_loc17_,_loc9_,_loc12_);
  121.                }
  122.                if(_loc11_ == true)
  123.                {
  124.                   if(_loc5_ == "_colorTransform")
  125.                   {
  126.                      Color(_loc3_.c).setTransform(_loc4_);
  127.                   }
  128.                   else
  129.                   {
  130.                      com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj,_loc17_,_loc9_,_loc12_);
  131.                   }
  132.                }
  133.                else
  134.                {
  135.                   var _loc21_ = this.getChangeObj(_loc3_.ps,_loc4_,false,false);
  136.                   _loc3_.ch = _loc21_.map;
  137.                   if(_loc21_.changed == true)
  138.                   {
  139.                      _loc10_ = true;
  140.                   }
  141.                }
  142.             }
  143.             else if(_loc11_ == true)
  144.             {
  145.                _loc14_.setFilterProp(obj,_loc5_,_loc4_);
  146.             }
  147.             else if(_loc19_ == true)
  148.             {
  149.                _loc3_.c = 2;
  150.                _loc3_.ch = [];
  151.                for(_loc40_ in _loc4_)
  152.                {
  153.                   if(_loc4_[_loc40_] != null)
  154.                   {
  155.                      if(_loc3_.ps == null)
  156.                      {
  157.                         _loc3_.ps = [];
  158.                      }
  159.                      _loc3_.ps[_loc40_] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc3_.ps[_loc40_] != null ? _loc3_.ps[_loc40_] : obj[_loc5_][_loc40_]);
  160.                      _loc21_ = this.getChangeObj(_loc3_.ps[_loc40_],com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc4_[_loc40_]),true,false);
  161.                      _loc3_.ch[_loc40_] = _loc21_.map;
  162.                      if(_loc21_.changed == true)
  163.                      {
  164.                         _loc10_ = true;
  165.                      }
  166.                   }
  167.                }
  168.             }
  169.             else
  170.             {
  171.                _loc3_.c = 1;
  172.                _loc3_.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc3_.ps);
  173.                _loc21_ = this.getChangeObj(_loc3_.ps,com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc4_),true,false);
  174.                _loc3_.ch = _loc21_.map;
  175.                if(_loc21_.changed == true)
  176.                {
  177.                   _loc10_ = true;
  178.                }
  179.             }
  180.          }
  181.          else if(_loc5_ == "_bezier_")
  182.          {
  183.             this.removeTween(obj,"_x,_y",true);
  184.             if(_loc11_ == true)
  185.             {
  186.                if(_loc4_.x != null && _global.isNaN(Number(_loc4_.x)) == false)
  187.                {
  188.                   obj._x = typeof _loc4_.x != "string" ? _loc4_.x : obj._x + Number(_loc4_.x);
  189.                }
  190.                if(_loc4_.y != null && _global.isNaN(Number(_loc4_.y)) == false)
  191.                {
  192.                   obj._y = typeof _loc4_.y != "string" ? _loc4_.y : obj._y + Number(_loc4_.y);
  193.                }
  194.             }
  195.             else
  196.             {
  197.                _loc3_.special = true;
  198.                _loc3_.ps = 0;
  199.                _loc3_.ch = 1;
  200.                _loc3_.bz = {sx:obj._x,sy:obj._y};
  201.                if(_loc4_.x == null || _global.isNaN(Number(_loc4_.x)))
  202.                {
  203.                   _loc4_.x = _loc3_.bz.sx;
  204.                }
  205.                if(_loc4_.y == null || _global.isNaN(Number(_loc4_.y)))
  206.                {
  207.                   _loc4_.y = _loc3_.bz.sy;
  208.                }
  209.                _loc3_.bz.chx = typeof _loc4_.x != "string" ? _loc4_.x - _loc3_.bz.sx : Number(_loc4_.x);
  210.                if(_global.isNaN(_loc3_.bz.chx) == true)
  211.                {
  212.                   _loc3_.bx.chx = 0;
  213.                }
  214.                _loc3_.bz.chy = typeof _loc4_.y != "string" ? _loc4_.y - _loc3_.bz.sy : Number(_loc4_.y);
  215.                if(_global.isNaN(_loc3_.bz.chy) == true)
  216.                {
  217.                   _loc3_.bx.chy = 0;
  218.                }
  219.                if(_loc4_.controlX == null || _global.isNaN(Number(_loc4_.controlX)))
  220.                {
  221.                   _loc3_.bz.ctrlx = _loc3_.bz.sx + _loc3_.bz.chx / 2;
  222.                }
  223.                else
  224.                {
  225.                   _loc3_.bz.ctrlx = typeof _loc4_.controlX != "string" ? _loc4_.controlX : _loc3_.bz.sx + Number(_loc4_.controlX);
  226.                }
  227.                if(_loc4_.controlY == null || _global.isNaN(Number(_loc4_.controlY)))
  228.                {
  229.                   _loc3_.bz.ctrly = _loc3_.bz.sy + _loc3_.bz.chy / 2;
  230.                }
  231.                else
  232.                {
  233.                   _loc3_.bz.ctrly = typeof _loc4_.controlY != "string" ? _loc4_.controlY : _loc3_.bz.sy + Number(_loc4_.controlY);
  234.                }
  235.                _loc3_.bz.ctrlx -= _loc3_.bz.sx;
  236.                _loc3_.bz.ctrly -= _loc3_.bz.sy;
  237.                _loc10_ = _loc3_.bz.chx + _loc3_.bz.chy != 0;
  238.             }
  239.          }
  240.          else
  241.          {
  242.             if(typeof _loc4_ == "object")
  243.             {
  244.                _loc3_.complex = !(_loc4_ instanceof Array) ? 1 : 0;
  245.             }
  246.             if(_loc5_ == "_x" || _loc5_ == "_y")
  247.             {
  248.                this.removeTween(obj,"_bezier_",true);
  249.             }
  250.             if(_loc5_ == "_frame" && typeof obj == "movieclip")
  251.             {
  252.                _loc3_.ps = obj._currentframe;
  253.                _loc3_.special = true;
  254.             }
  255.             else if(_loc13_ == false)
  256.             {
  257.                if(_loc3_.complex > -1)
  258.                {
  259.                   _loc3_.ps = _loc3_.complex != 0 ? {} : [];
  260.                   for(_loc40_ in _loc4_)
  261.                   {
  262.                      _loc3_.ps[_loc40_] = obj[_loc5_][_loc40_];
  263.                   }
  264.                }
  265.                else
  266.                {
  267.                   _loc3_.ps = obj[_loc5_];
  268.                }
  269.             }
  270.             if(_loc11_ == true)
  271.             {
  272.                if(_loc13_ == true)
  273.                {
  274.                   _loc14_.setFilterProp(obj,_loc5_,typeof _loc4_ != "string" ? _loc4_ : _loc3_.ps + Number(_loc4_));
  275.                }
  276.                else if(_loc3_.complex > -1)
  277.                {
  278.                   for(_loc40_ in _loc4_)
  279.                   {
  280.                      if(_loc4_[_loc40_] != null && _global.isNaN(Number(_loc4_[_loc40_])) == false)
  281.                      {
  282.                         obj[_loc5_][_loc40_] = typeof _loc4_[_loc40_] != "string" ? _loc4_[_loc40_] : _loc3_.ps[_loc40_] + Number(_loc4_[_loc40_]);
  283.                         if(_global.isNaN(obj[_loc5_][_loc40_]) == true)
  284.                         {
  285.                            obj[_loc5_][_loc40_] = 0;
  286.                         }
  287.                      }
  288.                   }
  289.                }
  290.                else
  291.                {
  292.                   obj[_loc5_] = typeof _loc4_ != "string" ? _loc4_ : _loc3_.ps + Number(_loc4_);
  293.                   if(_loc15_ == 1)
  294.                   {
  295.                      obj._visible = true;
  296.                   }
  297.                   else if(_loc15_ == -1)
  298.                   {
  299.                      obj._visible = false;
  300.                   }
  301.                }
  302.             }
  303.             else if(_loc3_.complex > -1)
  304.             {
  305.                _loc21_ = this.getChangeObj(_loc3_.ps,_loc4_,_loc13_,_loc3_.complex == 0);
  306.                _loc3_.ch = _loc21_.map;
  307.                if(_loc21_.changed == true)
  308.                {
  309.                   _loc10_ = true;
  310.                }
  311.             }
  312.             else
  313.             {
  314.                if(_loc4_ == null || _global.isNaN(Number(_loc4_)))
  315.                {
  316.                   _loc4_ = _loc3_.ps;
  317.                }
  318.                _loc3_.ch = typeof _loc4_ != "string" ? Number(_loc4_) - _loc3_.ps : Number(_loc4_);
  319.                if(_global.isNaN(_loc3_.ch) == true)
  320.                {
  321.                   _loc3_.ch = 0;
  322.                }
  323.                _loc10_ = _loc3_.ch != 0;
  324.             }
  325.          }
  326.          if(_loc24_ == 0 && (_loc10_ == true || _loc11_ == false) || _loc10_ == true && _loc11_ == false)
  327.          {
  328.             if(_loc3_.complex > -1 && _loc3_.c !== 2)
  329.             {
  330.                _loc3_.ps = [_loc3_.ps];
  331.                _loc3_.ch = [_loc3_.ch];
  332.             }
  333.             _loc3_.ts = this.now + delay * 1000;
  334.             _loc3_.pt = -1;
  335.             _loc3_.d = seconds * 1000;
  336.             _loc3_.ef = ease;
  337.             _loc3_.sf = false;
  338.             _loc3_.cycles = _loc44_;
  339.             if(_loc30_ != undefined)
  340.             {
  341.                _loc3_.e1 = _loc30_;
  342.             }
  343.             if(_loc29_ != undefined)
  344.             {
  345.                _loc3_.e2 = _loc29_;
  346.             }
  347.             _loc3_.v = _loc15_;
  348.             if(callback.start != undefined)
  349.             {
  350.                _loc3_.scb = callback.start;
  351.             }
  352.             if(callback.upd != undefined)
  353.             {
  354.                _loc3_.ucb = callback.upd;
  355.             }
  356.             if(callback.end != undefined)
  357.             {
  358.                _loc3_.ecb = callback.end;
  359.             }
  360.             if(callback.roundResults != undefined)
  361.             {
  362.                _loc3_.rr = callback.roundResults;
  363.             }
  364.             if(this.tweens[String(_loc22_)] == undefined)
  365.             {
  366.                var _loc0_ = null;
  367.                _loc7_ = this.tweens[String(_loc22_)] = {numProps:0,locked:false,targ:obj,targID:String("\"" + (obj._name == undefined ? obj.toString() : obj._name) + "\""),targZID:_loc22_,props:{}};
  368.                this.numTweens = this.numTweens + 1;
  369.             }
  370.             if(_loc16_ == true)
  371.             {
  372.                _loc7_.colorProp = _loc5_;
  373.             }
  374.             _loc7_.props[_loc5_] = _loc3_;
  375.             _loc7_.numProps = _loc7_.numProps + 1;
  376.             _loc25_ = _loc5_ + "," + _loc25_;
  377.             _loc28_ = (typeof _loc4_ != "string" ? _loc4_ : "\"" + _loc4_ + "\"") + "," + _loc28_;
  378.          }
  379.          _loc3_ = undefined;
  380.       }
  381.       if(_loc7_ == undefined || _loc7_.numProps <= 0)
  382.       {
  383.          this.cleanUp();
  384.       }
  385.       if(_loc23_.length > 0 && com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)
  386.       {
  387.          com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt",{target:obj,props:_loc23_,__zigoID__:_loc22_,during:"add"});
  388.       }
  389.       if(_loc25_ == "")
  390.       {
  391.          if(_loc24_ == 2)
  392.          {
  393.             if(com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2)
  394.             {
  395.                com.mosesSupposes.fuse.FuseKitCommon.error("011",obj._name == undefined ? obj.toString() : obj._name,props.toString());
  396.             }
  397.          }
  398.          else
  399.          {
  400.             var _loc48_ = obj._listeners.length > 0;
  401.             if(_loc48_ == true)
  402.             {
  403.                obj.broadcastMessage("onTweenStart",{target:obj,props:props});
  404.             }
  405.             if(callback.start != undefined)
  406.             {
  407.                callback.start.f.apply(callback.start.s,callback.start.a);
  408.             }
  409.             if(_loc48_ == true)
  410.             {
  411.                obj.broadcastMessage("onTweenUpdate",{target:obj,props:props});
  412.             }
  413.             if(callback.upd != undefined)
  414.             {
  415.                callback.upd.f.apply(callback.upd.s,callback.upd.a);
  416.             }
  417.             if(_loc48_ == true)
  418.             {
  419.                obj.broadcastMessage("onTweenEnd",{target:obj,props:props});
  420.             }
  421.             if(callback.end != undefined)
  422.             {
  423.                callback.end.f.apply(callback.end.s,callback.end.a);
  424.             }
  425.          }
  426.          this.cleanUp();
  427.       }
  428.       if(com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2)
  429.       {
  430.          if(_loc25_ == "")
  431.          {
  432.             com.mosesSupposes.fuse.FuseKitCommon.error("012",obj._name == undefined ? obj.toString() : obj._name,props.toString(),endvals.toString());
  433.          }
  434.          else
  435.          {
  436.             com.mosesSupposes.fuse.FuseKitCommon.error("013",obj._name == undefined ? obj.toString() : obj._name,_loc25_.slice(0,-1),_loc28_.slice(0,-1));
  437.          }
  438.       }
  439.       return _loc25_ != "" ? _loc25_.slice(0,-1) : null;
  440.    }
  441.    function removeTween(targs, props, noInit)
  442.    {
  443.       var _loc4_ = {};
  444.       var _loc12_ = this.paramsObj(targs,props);
  445.       if(_loc12_.none == true)
  446.       {
  447.          return undefined;
  448.       }
  449.       var _loc16_ = _loc12_.all;
  450.       var _loc17_ = _loc12_.allprops;
  451.       var _loc9_ = _loc16_ != true ? Object(_loc12_.tg) : this.tweens;
  452.       var _loc8_ = false;
  453.       for(var _loc20_ in _loc9_)
  454.       {
  455.          var _loc3_ = _loc16_ != true ? String(_loc9_[_loc20_].__zigoID__) : _loc20_;
  456.          var _loc2_ = this.tweens[_loc3_];
  457.          var _loc6_ = _loc17_ != true ? _loc12_.props : _loc2_.props;
  458.          for(var _loc14_ in _loc6_)
  459.          {
  460.             var _loc5_ = _loc14_ == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR && _loc2_.colorProp != undefined;
  461.             if(_loc2_.props[_loc14_] != undefined || _loc5_ == true)
  462.             {
  463.                if(_loc4_[_loc3_] == null)
  464.                {
  465.                   _loc4_[_loc3_] = [];
  466.                }
  467.                _loc4_[_loc3_].unshift(_loc14_);
  468.                if(_loc14_ == _loc2_.colorProp || _loc5_ == true)
  469.                {
  470.                   delete _loc2_.props[_loc2_.colorProp];
  471.                   delete _loc2_.colorProp;
  472.                }
  473.                else
  474.                {
  475.                   delete _loc2_.props[_loc14_];
  476.                }
  477.                _loc2_.numProps = _loc2_.numProps - 1;
  478.                if(_loc2_.numProps <= 0)
  479.                {
  480.                   _loc8_ = true;
  481.                   break;
  482.                }
  483.             }
  484.          }
  485.       }
  486.       if(com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)
  487.       {
  488.          for(var _loc19_ in _loc4_)
  489.          {
  490.             var _loc7_ = this.tweens[_loc19_].targ;
  491.             com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt",{target:(typeof _loc7_.addProperty != "function" ? "[MISSING(\"" + this.tweens[_loc19_].targID + "\")]" : _loc7_),props:_loc4_[_loc19_],__zigoID__:this.tweens[_loc19_].targZID,during:(noInit != true ? "remove" : "add")});
  492.          }
  493.       }
  494.       if(_loc8_ == true)
  495.       {
  496.          this.cleanUp(noInit);
  497.       }
  498.    }
  499.    function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo)
  500.    {
  501.       if(type == "lock")
  502.       {
  503.          this.tweens[String(targs.__zigoID__)].locked = props;
  504.          return undefined;
  505.       }
  506.       var _loc11_ = this.paramsObj(targs,props);
  507.       if(_loc11_.none == true)
  508.       {
  509.          return undefined;
  510.       }
  511.       var _loc14_ = _loc11_.all;
  512.       var _loc15_ = _loc11_.allprops;
  513.       var _loc9_ = _loc14_ != true ? Object(_loc11_.tg) : this.tweens;
  514.       var _loc8_ = 0;
  515.       for(var _loc16_ in _loc9_)
  516.       {
  517.          var _loc7_ = _loc14_ != true ? String(_loc9_[_loc16_].__zigoID__) : _loc16_;
  518.          var _loc5_ = this.tweens[_loc7_];
  519.          var _loc4_ = _loc15_ != true ? _loc11_.props : _loc5_.props;
  520.          if(_loc4_.ALLCOLOR == true)
  521.          {
  522.             _loc4_[_loc5_.colorProp] = true;
  523.             delete _loc4_.ALLCOLOR;
  524.          }
  525.          for(var _loc10_ in _loc4_)
  526.          {
  527.             _loc8_ = _loc8_ + 1;
  528.             var _loc2_ = _loc5_.props[_loc10_];
  529.             if(type == "rewind")
  530.             {
  531.                if(pauseFlag == true)
  532.                {
  533.                   _loc2_.pt = this.now;
  534.                }
  535.                _loc2_.ts = this.now;
  536.                if(noEvents != true)
  537.                {
  538.                   _loc2_.sf = false;
  539.                   if(_loc2_.scb != undefined)
  540.                   {
  541.                      _loc2_.scb.fired = false;
  542.                   }
  543.                }
  544.             }
  545.             else if(type == "ff")
  546.             {
  547.                if(noEvents == true)
  548.                {
  549.                   _loc2_.suppressEnd = true;
  550.                }
  551.                _loc2_.o = true;
  552.                _loc2_.pt = -1;
  553.                _loc2_.ts = this.now - _loc2_.d;
  554.             }
  555.             else if(type == "skipTo")
  556.             {
  557.                _loc2_.ts = Math.min(this.now,_loc2_.ts + (this.now - _loc2_.ts) - skipTo * 1000);
  558.             }
  559.             else if(type == "pause")
  560.             {
  561.                if(_loc2_.pt == -1)
  562.                {
  563.                   _loc2_.pt = this.now;
  564.                }
  565.             }
  566.             else if(type == "unpause")
  567.             {
  568.                if(_loc2_.pt != -1)
  569.                {
  570.                   _loc2_.ts = this.now - (_loc2_.pt - _loc2_.ts);
  571.                   _loc2_.pt = -1;
  572.                }
  573.             }
  574.          }
  575.       }
  576.       if(type == "ff" && _loc8_ > 0)
  577.       {
  578.          this.update();
  579.       }
  580.       else if(type == "rewind" && _loc8_ > 0)
  581.       {
  582.          this.update(true);
  583.       }
  584.    }
  585.    function getStatus(type, targ, param)
  586.    {
  587.       if(targ == null)
  588.       {
  589.          return null;
  590.       }
  591.       var _loc8_ = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
  592.       var _loc4_ = this.tweens[String(targ.__zigoID__)];
  593.       switch(type)
  594.       {
  595.          case "paused":
  596.             var _loc2_ = _loc4_.props;
  597.             if(param != null)
  598.             {
  599.                if(_loc2_[String(param)] == undefined)
  600.                {
  601.                   return false;
  602.                }
  603.                return Boolean(_loc2_[String(param)].pt != -1);
  604.             }
  605.             for(var _loc6_ in _loc2_)
  606.             {
  607.                if(_loc2_[_loc6_].pt != -1)
  608.                {
  609.                   return true;
  610.                }
  611.             }
  612.             return false;
  613.             break;
  614.          case "active":
  615.             if(param == null)
  616.             {
  617.                return Boolean(_loc4_ != undefined);
  618.             }
  619.             if(String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR)
  620.             {
  621.                return Boolean(_loc4_.colorProp != undefined);
  622.             }
  623.             return Boolean(_loc4_.props[String(param)] != undefined);
  624.             break;
  625.          case "count":
  626.             if(!_loc8_)
  627.             {
  628.                return _loc4_.numProps;
  629.             }
  630.             var _loc3_ = 0;
  631.             for(_loc6_ in this.tweens)
  632.             {
  633.                _loc3_ += this.tweens[_loc6_].numProps;
  634.             }
  635.             return _loc3_;
  636.             break;
  637.          case "locked":
  638.             return _loc4_.locked;
  639.          default:
  640.       }
  641.    }
  642.    function update(force)
  643.    {
  644.       var _loc22_ = {};
  645.       var _loc24_ = {};
  646.       var _loc23_ = {};
  647.       var _loc15_ = {};
  648.       var _loc13_ = {};
  649.       var _loc14_ = {};
  650.       var _loc26_ = false;
  651.       var _loc20_ = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
  652.       for(var _loc35_ in this.tweens)
  653.       {
  654.          var _loc12_ = this.tweens[_loc35_];
  655.          var _loc5_ = _loc12_.targ;
  656.          var _loc34_ = _loc12_.props;
  657.          var _loc21_ = _loc5_._listeners.length > 0;
  658.          if(_loc5_.__zigoID__ == undefined)
  659.          {
  660.             _loc26_ = true;
  661.             if(com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)
  662.             {
  663.                var _loc25_ = [];
  664.                for(var _loc30_ in _loc34_)
  665.                {
  666.                   _loc25_.unshift(_loc30_);
  667.                }
  668.                com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt",{target:(typeof _loc5_.addProperty != "function" ? "[MISSING:" + _loc12_.targID + "]" : _loc5_),props:_loc25_,__zigoID__:_loc12_.targZID,during:"update"});
  669.             }
  670.          }
  671.          else
  672.          {
  673.             for(_loc30_ in _loc34_)
  674.             {
  675.                var _loc3_ = _loc34_[_loc30_];
  676.                if(!((_loc3_.ts > this.now || _loc3_.pt != -1) && force != true))
  677.                {
  678.                   var _loc9_ = this.now >= _loc3_.ts + _loc3_.d;
  679.                   if(_loc3_.complex == -1)
  680.                   {
  681.                      var _loc6_ = undefined;
  682.                      if(_loc9_ == true)
  683.                      {
  684.                         _loc6_ = _loc3_.ps + _loc3_.ch;
  685.                         if(_loc3_.cycles > 1 || _loc3_.cycles == 0)
  686.                         {
  687.                            if(_loc3_.cycles > 1)
  688.                            {
  689.                               _loc3_.cycles = _loc3_.cycles - 1;
  690.                            }
  691.                            _loc3_.ps = _loc6_;
  692.                            _loc3_.ch = - _loc3_.ch;
  693.                            _loc3_.ts = this.now;
  694.                            _loc9_ = false;
  695.                         }
  696.                      }
  697.                      else
  698.                      {
  699.                         _loc6_ = _loc3_.ef(this.now - _loc3_.ts,_loc3_.ps,_loc3_.ch,_loc3_.d,_loc3_.e1,_loc3_.e2);
  700.                      }
  701.                      if(_global.isNaN(_loc6_) == false)
  702.                      {
  703.                         if(_loc30_ != "_bezier_" && (_loc3_.rr == true || _loc20_ == true && _loc3_.rr !== false))
  704.                         {
  705.                            _loc6_ = Math.round(Number(_loc6_));
  706.                         }
  707.                         if(_loc3_.special != true)
  708.                         {
  709.                            _loc5_[_loc30_] = _loc6_;
  710.                         }
  711.                         else if(_loc3_.fmp != -1)
  712.                         {
  713.                            _loc3_.fmp.setFilterProp(_loc5_,_loc30_,_loc6_);
  714.                         }
  715.                         else if(_loc30_ == "_bezier_")
  716.                         {
  717.                            var _loc10_ = _loc3_.bz;
  718.                            var _loc18_ = _loc10_.sx + _loc6_ * (2 * (1 - _loc6_) * _loc10_.ctrlx + _loc6_ * _loc10_.chx);
  719.                            var _loc17_ = _loc10_.sy + _loc6_ * (2 * (1 - _loc6_) * _loc10_.ctrly + _loc6_ * _loc10_.chy);
  720.                            if(_loc3_.rr == true || _loc20_ == true && _loc3_.rr !== false)
  721.                            {
  722.                               _loc18_ = Math.round(Number(_loc18_));
  723.                               _loc17_ = Math.round(Number(_loc17_));
  724.                            }
  725.                            _loc5_._x = _loc18_;
  726.                            _loc5_._y = _loc17_;
  727.                         }
  728.                         else if(_loc30_ == "_frame")
  729.                         {
  730.                            MovieClip(_loc5_).gotoAndStop(Math.ceil(_loc6_));
  731.                         }
  732.                      }
  733.                   }
  734.                   else
  735.                   {
  736.                      var _loc16_ = _loc9_ == true && (_loc3_.cycles > 1 || _loc3_.cycles == 0);
  737.                      var _loc7_ = [];
  738.                      for(var _loc27_ in _loc3_.ch)
  739.                      {
  740.                         var _loc4_ = _loc3_.complex != 0 ? {} : [];
  741.                         for(var _loc28_ in _loc3_.ch[_loc27_])
  742.                         {
  743.                            var _loc8_ = _loc3_.ch[_loc27_][_loc28_];
  744.                            var _loc11_ = _loc3_.ps[_loc27_][_loc28_];
  745.                            if(_loc9_ == true)
  746.                            {
  747.                               _loc4_[_loc28_] = _loc11_ + _loc8_;
  748.                               if(_loc16_ == true)
  749.                               {
  750.                                  _loc3_.ch[_loc27_][_loc28_] = - _loc8_;
  751.                               }
  752.                            }
  753.                            else
  754.                            {
  755.                               _loc4_[_loc28_] = _loc3_.ef(this.now - _loc3_.ts,_loc11_,_loc8_,_loc3_.d,_loc3_.e1,_loc3_.e2);
  756.                            }
  757.                            if(_global.isNaN(_loc4_[_loc28_]) == false)
  758.                            {
  759.                               if(_loc3_.rr == true || _loc20_ == true && _loc3_.rr !== false)
  760.                               {
  761.                                  _loc4_[_loc28_] = Math.round(_loc4_[_loc28_]);
  762.                               }
  763.                            }
  764.                            if(_loc3_.fmp == -1 && _loc3_.c == -1)
  765.                            {
  766.                               _loc5_[_loc30_][_loc28_] = _loc4_[_loc28_];
  767.                            }
  768.                         }
  769.                         _loc7_.push(_loc4_);
  770.                         if(_loc3_.fmp == -1 && _loc3_.c == 2)
  771.                         {
  772.                            _loc5_[_loc30_][_loc27_] = Number(_loc4_.rb << 16 | _loc4_.gb << 8 | _loc4_.bb);
  773.                         }
  774.                      }
  775.                      if(_loc3_.fmp != -1)
  776.                      {
  777.                         if(_loc3_.c == 1)
  778.                         {
  779.                            _loc3_.fmp.setFilterProp(_loc5_,_loc30_,_loc7_[0].rb << 16 | _loc7_[0].gb << 8 | _loc7_[0].bb);
  780.                         }
  781.                         else if(_loc3_.c == 2)
  782.                         {
  783.                            var _loc19_ = [];
  784.                            for(_loc28_ in _loc7_)
  785.                            {
  786.                               _loc19_.unshift(_loc7_[_loc28_].rb << 16 | _loc7_[_loc28_].gb << 8 | _loc7_[_loc28_].bb);
  787.                            }
  788.                            _loc3_.fmp.setFilterProp(_loc5_,_loc30_,_loc19_);
  789.                         }
  790.                      }
  791.                      else if(_loc3_.c != -1)
  792.                      {
  793.                         _loc3_.c.setTransform(_loc7_[0]);
  794.                      }
  795.                      if(_loc16_ == true)
  796.                      {
  797.                         if(_loc3_.cycles > 1)
  798.                         {
  799.                            _loc3_.cycles = _loc3_.cycles - 1;
  800.                         }
  801.                         _loc9_ = false;
  802.                         _loc3_.ts = this.now;
  803.                         _loc3_.ps = _loc7_;
  804.                      }
  805.                   }
  806.                   if(_loc3_.sf == false)
  807.                   {
  808.                      if(_loc3_.v != 0)
  809.                      {
  810.                         _loc5_._visible = true;
  811.                      }
  812.                      if(_loc21_ == true)
  813.                      {
  814.                         if(_loc15_[_loc35_] == undefined)
  815.                         {
  816.                            _loc15_[_loc35_] = [_loc5_,[]];
  817.                         }
  818.                         _loc15_[_loc35_][1].unshift(_loc30_);
  819.                      }
  820.                      _loc3_.sf = true;
  821.                   }
  822.                   if(_loc3_.scb.fired == false)
  823.                   {
  824.                      _loc22_[String(_loc3_.scb.id)] = _loc3_.scb;
  825.                      _loc3_.scb.fired = true;
  826.                   }
  827.                   if(_loc21_ == true)
  828.                   {
  829.                      if(_loc13_[_loc35_] == undefined)
  830.                      {
  831.                         _loc13_[_loc35_] = [_loc5_,[]];
  832.                      }
  833.                      _loc13_[_loc35_][1].unshift(_loc30_);
  834.                   }
  835.                   if(_loc3_.ucb != undefined)
  836.                   {
  837.                      _loc24_[String(_loc3_.ucb.id)] = _loc3_.ucb;
  838.                   }
  839.                   if(_loc9_ == true)
  840.                   {
  841.                      if(_loc3_.v === -1)
  842.                      {
  843.                         _loc5_._visible = false;
  844.                      }
  845.                      if(_loc3_.suppressEnd != true)
  846.                      {
  847.                         if(_loc21_ == true)
  848.                         {
  849.                            if(_loc14_[_loc35_] == undefined)
  850.                            {
  851.                               _loc14_[_loc35_] = [_loc5_,[]];
  852.                            }
  853.                            _loc14_[_loc35_][1].unshift(_loc30_);
  854.                         }
  855.                         if(_loc3_.ecb != undefined)
  856.                         {
  857.                            _loc23_[String(_loc3_.ecb.id)] = _loc3_.ecb;
  858.                         }
  859.                      }
  860.                      delete _loc34_[_loc30_];
  861.                      if(_loc30_ == _loc12_.colorProp)
  862.                      {
  863.                         delete _loc12_.colorProp;
  864.                      }
  865.                      _loc12_.numProps = _loc12_.numProps - 1;
  866.                      if(_loc12_.numProps <= 0)
  867.                      {
  868.                         _loc26_ = true;
  869.                      }
  870.                   }
  871.                   delete _loc3_.suppressEnd;
  872.                }
  873.             }
  874.          }
  875.       }
  876.       for(_loc35_ in _loc15_)
  877.       {
  878.          _loc15_[_loc35_][0].broadcastMessage("onTweenStart",{target:_loc15_[_loc35_][0],props:_loc15_[_loc35_][1]});
  879.       }
  880.       for(_loc35_ in _loc22_)
  881.       {
  882.          _loc22_[_loc35_].f.apply(_loc22_[_loc35_].s,_loc22_[_loc35_].a);
  883.       }
  884.       for(_loc35_ in _loc13_)
  885.       {
  886.          _loc13_[_loc35_][0].broadcastMessage("onTweenUpdate",{target:_loc13_[_loc35_][0],props:_loc13_[_loc35_][1]});
  887.       }
  888.       for(_loc35_ in _loc24_)
  889.       {
  890.          _loc24_[_loc35_].f.apply(_loc24_[_loc35_].s,_loc24_[_loc35_].a);
  891.       }
  892.       for(_loc35_ in _loc14_)
  893.       {
  894.          _loc14_[_loc35_][0].broadcastMessage("onTweenEnd",{target:_loc14_[_loc35_][0],props:_loc14_[_loc35_][1]});
  895.       }
  896.       for(_loc35_ in _loc23_)
  897.       {
  898.          _loc23_[_loc35_].f.apply(_loc23_[_loc35_].s,_loc23_[_loc35_].a);
  899.       }
  900.       if(_loc26_)
  901.       {
  902.          this.cleanUp();
  903.       }
  904.       this.now = getTimer();
  905.    }
  906.    function cleanUp(noInit)
  907.    {
  908.       for(var _loc4_ in this.tweens)
  909.       {
  910.          var _loc2_ = this.tweens[_loc4_].targ;
  911.          if(this.tweens[_loc4_].numProps <= 0 || _loc2_.__zigoID__ == undefined)
  912.          {
  913.             if(_loc2_ != undefined && _loc2_.tween == undefined && noInit != true && _loc2_._listeners.length <= 0)
  914.             {
  915.                com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_loc2_);
  916.             }
  917.             delete this.tweens[_loc4_];
  918.             this.numTweens = this.numTweens - 1;
  919.          }
  920.       }
  921.       if(this.numTweens <= 0)
  922.       {
  923.          this.numTweens = 0;
  924.          delete this.tweens;
  925.          this.tweens = {};
  926.          if(noInit != true)
  927.          {
  928.             com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this,"setup",[true]);
  929.          }
  930.       }
  931.    }
  932.    function paramsObj(targs, props, endvals, retainFade)
  933.    {
  934.       var _loc6_ = {};
  935.       _loc6_.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
  936.       _loc6_.none = Boolean(targs == null);
  937.       if(_loc6_.all == true)
  938.       {
  939.          _loc6_.tg = [null];
  940.       }
  941.       else
  942.       {
  943.          _loc6_.tg = !(targs instanceof Array) ? [targs] : targs;
  944.          for(var _loc11_ in _loc6_.tg)
  945.          {
  946.             var _loc7_ = _loc6_.tg[_loc11_];
  947.             if(_loc7_ == null || !(typeof _loc7_ == "object" || typeof _loc7_ == "movieclip"))
  948.             {
  949.                _loc6_.tg.splice(Number(_loc11_),1);
  950.             }
  951.          }
  952.       }
  953.       _loc6_.allprops = props == null;
  954.       var _loc1_ = undefined;
  955.       var _loc4_ = undefined;
  956.       var _loc3_ = {};
  957.       if(_loc6_.allprops == false)
  958.       {
  959.          if(typeof props == "string" && (String(props).indexOf(" ") > -1 || String(props).indexOf(",") > -1))
  960.          {
  961.             props = String(props.split(" ").join("")).split(",");
  962.          }
  963.          _loc1_ = !(props instanceof Array) ? [props] : props.slice();
  964.          if(endvals != undefined)
  965.          {
  966.             if(typeof endvals == "string" && (String(endvals).indexOf(" ") > -1 || String(endvals).indexOf(",") > -1))
  967.             {
  968.                endvals = String(endvals.split(" ").join("")).split(",");
  969.             }
  970.             _loc4_ = !(endvals instanceof Array) ? [endvals] : endvals.slice();
  971.             while(_loc4_.length < _loc1_.length)
  972.             {
  973.                _loc4_.push(_loc4_[_loc4_.length - 1]);
  974.             }
  975.             _loc4_.splice(_loc1_.length,_loc4_.length - _loc1_.length);
  976.          }
  977.          for(_loc11_ in _loc1_)
  978.          {
  979.             var _loc2_ = Number(_loc11_);
  980.             if(_loc1_[_loc11_] != "_scale" && _loc1_[_loc11_] != "_size")
  981.             {
  982.                if(_loc3_[_loc1_[_loc11_]] == undefined)
  983.                {
  984.                   if(_loc1_[_loc11_] == "_fade" && retainFade != true)
  985.                   {
  986.                      _loc1_[_loc11_] = "_alpha";
  987.                   }
  988.                   if(String(_loc1_[_loc11_]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR)
  989.                   {
  990.                      _loc1_[_loc11_] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
  991.                   }
  992.                   _loc3_[_loc1_[_loc11_]] = true;
  993.                }
  994.                else
  995.                {
  996.                   _loc1_.splice(_loc2_,1);
  997.                   _loc4_.splice(_loc2_,1);
  998.                }
  999.             }
  1000.             else
  1001.             {
  1002.                var _loc8_ = String(_loc1_.splice(_loc2_,1)[0]);
  1003.                var _loc5_ = _loc4_.splice(_loc2_,1)[0];
  1004.                if(_loc8_ == "_scale")
  1005.                {
  1006.                   if(_loc3_._xscale == undefined)
  1007.                   {
  1008.                      _loc1_.splice(_loc2_,0,"_xscale");
  1009.                      _loc4_.splice(_loc2_,0,_loc5_);
  1010.                      _loc3_._xscale = true;
  1011.                      _loc2_ = _loc2_ + 1;
  1012.                   }
  1013.                   if(_loc3_._yscale == undefined)
  1014.                   {
  1015.                      _loc1_.splice(_loc2_,0,"_yscale");
  1016.                      _loc4_.splice(_loc2_,0,_loc5_);
  1017.                      _loc3_._yscale = true;
  1018.                   }
  1019.                }
  1020.                if(_loc8_ == "_size")
  1021.                {
  1022.                   if(_loc3_._width == undefined)
  1023.                   {
  1024.                      _loc1_.splice(_loc2_,0,"_width");
  1025.                      _loc4_.splice(_loc2_,0,_loc5_);
  1026.                      _loc3_._width = true;
  1027.                      _loc2_ = _loc2_ + 1;
  1028.                   }
  1029.                   if(_loc3_._yscale == undefined)
  1030.                   {
  1031.                      _loc1_.splice(_loc2_,0,"_height");
  1032.                      _loc4_.splice(_loc2_,0,_loc5_);
  1033.                      _loc3_._height = true;
  1034.                   }
  1035.                }
  1036.             }
  1037.          }
  1038.          for(_loc11_ in _loc1_)
  1039.          {
  1040.             if(_loc1_[_loc11_] == "_xscale" && _loc3_._width == true || _loc1_[_loc11_] == "_yscale" && _loc3_._height == true)
  1041.             {
  1042.                _loc1_.splice(Number(_loc11_),1);
  1043.                _loc4_.splice(Number(_loc11_),1);
  1044.                delete _loc3_[_loc1_[_loc11_]];
  1045.             }
  1046.          }
  1047.       }
  1048.       _loc6_.pa = _loc1_;
  1049.       _loc6_.va = _loc4_;
  1050.       _loc6_.props = _loc3_;
  1051.       return _loc6_;
  1052.    }
  1053.    function getChangeObj(ps, ep, isFMP, useArray)
  1054.    {
  1055.       var _loc3_ = {map:(useArray != true ? {} : []),changed:false};
  1056.       for(var _loc7_ in ep)
  1057.       {
  1058.          if((isFMP == true && _loc7_.charAt(1) == "b" || ep[_loc7_] != ps[_loc7_] || useArray == true) && ep[_loc7_] != null && _global.isNaN(Number(ep[_loc7_])) == false)
  1059.          {
  1060.             _loc3_.map[_loc7_] = typeof ep[_loc7_] != "string" ? ep[_loc7_] - ps[_loc7_] : Number(ep[_loc7_]);
  1061.             if(_global.isNaN(_loc3_.map[_loc7_]) == true)
  1062.             {
  1063.                _loc3_.map[_loc7_] = 0;
  1064.             }
  1065.             else if(_loc3_.map[_loc7_] != 0)
  1066.             {
  1067.                _loc3_.changed = true;
  1068.             }
  1069.          }
  1070.       }
  1071.       return _loc3_;
  1072.    }
  1073. }
  1074.